package com.ace3l.legal.backend.domain;

import javax.persistence.*;

/**
 * ACE3L.COM
 * com.ace3l.manager.domain
 * This code was written by Synesthesia Consulting Services in conjunction
 * with Ace3L.com. This code is confidential and proprietary. This code is
 * copyright (C) 2008  Synesthesia Consulting Services and Ace3L.com
 * Created By: ageer
 * Date: Jun 17, 2008
 * Time: 8:39:03 PM
 */
@Entity
@Table(name ="ROLE")
@org.hibernate.annotations.GenericGenerator(
    name = "hibernate-increment",
    strategy = "increment"
)
public class Role {
    @Transient
    public static final String LAWFIRM = "LAWFIRM";
    @Transient
    public static final String ADMIN = "ADMIN";
    @Transient
    public static final String STUDENT = "STUDENT";

    @Id @GeneratedValue(generator = "hibernate-increment")
    @Column(name="ROLE_ID")
    private Integer id;
    
    @ManyToOne()
    @JoinColumn(name="USER_ID")
    private User user;
    
    private String username;
    
    @Column(name="USERROLE")
    private String role;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public String toString() {
        return role;
    }
}
